﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Common.Dtos
{
    public class MenuBaseDto:BaseDto
    {
        //public MenuBaseDto(int id, int pId, int level, bool isPermission, int sort)
        //{
        //    Id = id;
        //    PId = pId;
        //    Level = level;
        //    IsPermission = isPermission;
        //    Sort = sort;
        //}

        public int Id { get; set; }

        //public int PId { get; set; }

        private int pId;

        public int PId
        {
            get { return pId; }
            set { pId = value; OnPropertyChanged(); }
        }


        private string titleName;
        public string TitleName
        {
            get { return titleName; }
            set { titleName = value; OnPropertyChanged(); }
        }

        //public string Target { get; set; }

        private string? _target="";

        public string? Target
        {
            get { return _target; }
            set { _target = value; OnPropertyChanged(); }
        }

        //public int Level { get; set; }
        private int level=0;

        public int Level
        {
            get { return level; }
            set { level = value; }
        }


        public bool IsPermission { get; set; }

        public bool IsView { get; set; }

        public int Sort { get; set; }

        public List<MenuBaseDto>? children;

        public List<MenuBaseDto>? Children
        {
            get { return children; }
            set { children = value; OnPropertyChanged(); }
        }
    }
}
